Bypassing native storage operations by communicating protected data within locking messages using a lock manager independent of the storage mechanism

ABSTRACT

Data is protected using locks, with the protected data sometimes being included in the locking messages, which may reduce overall processing latency, and/or reduce a bandwidth requirement for and/or number of storage operations accessing the native storage of the protected data. For example, the lock manager receives lock requests from each of the requesters, and selectively grants the lock requests. The protected data is typically communicated in the locking messages when the lock is highly contested, or at least two request for access to the data are pending. The lock manager initiates the sequence by indicating in a grant message to a requester to include the protected data in its release message. The lock manager then copies this data received in the release message to its grant message to the next requestor. If no other requesters are waiting, the grant message includes an indication not to send the protected data, and thus the requestor typically stores this protected data to storage so it can be accessed in the future.

TECHNICAL FIELD

One embodiment of the invention relates to communications and computersystems employing locking mechanisms to protect data; particularly, oneembodiment relates to communicating protected data within lockingmessages; and more particularly, one embodiment relates to bypassingnative storage by communicating protected data within locking messageswith a lock manager independent of the storage mechanism.

BACKGROUND

In many multiprocessor environments, inter-processor communication isprovided through shared global memory. Access to this memory isgenerally protected through locks. The latency for access to theseresources is coupled through the critical section of code and includesacquiring the lock, reading the data, writing the data, and finallyreleasing the lock. Note, nothing described or referenced in thisdocument is admitted as prior art to this application unless explicitlyso stated.

One such prior approach is illustrated in FIG. 1, which shows how threerequesters request and gain access to protected data. Note, as shown inFIG. 1, the lock manager is independent of the storage mechanism as itdoes not access the lock protected data from its native storage. Infact, the lock manager of FIG. 1 never communicates nor otherwiseprocesses a value of the protected data.

As shown, each requester sends a request to the lock manager, whichprovides independent access to the protected data by sending a grantmessage to one of the requesters. The granted requester then reads theprotected data, performs its processing, writes the protected data backto memory, and then sends a release request to the lock manager toindicate that it is done with the protected data. This process repeatsand a next requester is granted access to the data. Thus, there can besignificant amount of latency that is exposed in the critical section ofcode, especially when multiple processors are queued up behind a singlelocking queue. The significant amount of latency is also true ofprocessors that rely on caching within the processor units to providetemporary storage as well as provide direct inter-processorcommunication to transfer data.

Also, one known system includes a lock manager in an I/O subsystem whichallows a message to include both locking and data storage requests. Thisallows a requester proxy process in the I/O subsystem to receive amessage with both a lock request and an I/O request. In response, thisproxy process makes a request to the lock manager for the lock, and inresponse to a grant, it then makes the corresponding I/O requestcorresponding to the I/O request and its native storage. This approachmay reduce some messages and latency when the protected data is locatedin another subsystem, but in response to each grant, the I/O nativestorage is still accessed.

SUMMARY

Disclosed are, inter alia, methods, apparatus, data structures,computer-readable media, mechanisms, and means for communicatingprotected data within locking messages. Data is protected using locks,with the protected data sometimes being included in the lockingmessages, which may reduce overall processing latency, and/or reduce abandwidth requirement for and/or number of storage operations accessingthe native storage of the protected data. For example, in oneembodiment, the lock manager receives lock requests from each of therequesters, and selectively grants the lock requests. The protected datais typically communicated in the locking messages when the lock ishighly contested, or at least two request for access to the data arepending. The lock manager initiates the sequence by indicating in agrant message to a requester to include the protected data in itsrelease message. The lock manager then copies this data received in therelease message to its grant message to the next requestor. Althoughthis operation may require the lock manager to temporarily store thereceived release message including the protected data, it does not cacheor otherwise store the protected data locally awaiting the receipt of anext request, for example. If no other requesters are waiting, the grantmessage includes an indication not to send the protected data, and thusthe requester typically stores this protected data to storage so it canbe accessed in the future.

One embodiment includes a lock manager configured to control access viaa lock to protected data maintained in native storage independent of thelock manager. The lock manager does not access the protected data fromthe native storage, rather it copies the protected data received intogrant messages sent to a next requester. The lock manager is configuredto receive lock requests for the lock from multiple requesters, and toselectively grant the lock requests which includes communicating grantsfrom the lock manager to the plurality of requesters, wherein at leastone of the communicated grants includes the protected data.

In one embodiment, wherein at least one of the communicated grants doesnot include the protected data. In one embodiment, each of thecommunicated grants includes an indication of whether or not theprotected data is being communicated therewith. In one embodiment, eachof the communicated grants includes an indication of whether or not theprotected data is requested to be sent to the lock manager with acorresponding release of the lock. In one embodiment, each of the lockrequests includes an indication of whether or not the corresponding oneof the plurality of requesters will accept the protected data from thelock manager.

One embodiment includes a lock manager that controls access to protecteddata maintained in native storage independent of the lock manager,wherein the lock manager does not access the protected data from thenative storage. The lock manager receives a release of a lock for use incontrolling access to the protected data, with the received releaseincluding the protected data. A next requester to be granted the lock isidentified in response to the receiving the release of the lock. Theprotected data is copied from the release into a grant message, and thegrant message including the protected data is sent to the nextrequester. In one embodiment, the grant message includes an indicationof that the protected data is requested to be sent to the lock managerin a release message corresponding to the grant message if anotherrequester is waiting for the lock, else an indication that the protecteddata is not requested to be sent to the lock manager in the releasemessage.

One embodiment includes a lock manager that controls access to protecteddata maintained in native storage independent of the lock manager,wherein the lock manager does not access the protected data from thenative storage. The lock manager receives locking requests for a lockcontrolling access to the protected data from a first requester and asecond requester. The lock manager sends a first grant message notincluding the protected data to the first requester, and in response toidentifying one or more requesters is waiting for the lock after thefirst requester, an indication to return the protected data is includedin the grant message. A first release message including the protecteddata for the lock is subsequently received from the first requester.

In one embodiment, a second grant message is sent to the secondrequester, with the second grant message including the protected dataand an indication of whether or not to send the protected data in asecond release message. In one embodiment, the second grant messageincludes an indication to send the protected data in the second releasemessage in response to identifying another requestor is waiting foraccess to the lock. In one embodiment, the second grant message includesan indication not to send the protected data in the second releasemessage in response to identifying another requestor is not waiting foraccess to the lock. In one embodiment, the second grant message includesan indication not to send the protected data in the second releasemessage, and in response to the indication not to send the protecteddata in the second release message, the second requester stores theprotected data and does not include the protected data in the secondrelease message.

BRIEF DESCRIPTION OF THE DRAWINGS

The appended claims set forth the features of the invention withparticularity. The invention, together with its advantages, may be bestunderstood from the following detailed description taken in conjunctionwith the accompanying drawings of which:

FIG. 1 illustrates a prior approach for using a lock to protect accessto data;

FIG. 2. illustrates an approach used in one embodiment for protectingaccess to data with the protected data being communicated in conjunctionwith locking messages;

FIG. 3 illustrates locking messages used in one embodiment;

FIGS. 4A-B illustrate lock manager processes used in one embodiment;

FIG. 4C illustrates a requester process used in one embodiment; and

FIG. 5A illustrates a system including a lock manager and multiplerequesters of one embodiment; and

FIG. 5B illustrate a system or component used in one embodiment forimplementing a lock manager and/or one or more requesters.

DETAILED DESCRIPTION

Disclosed are, inter alia, methods, apparatus, data structures,computer-readable media, mechanisms, and means for communicatingprotected data within locking messages.

Embodiments described herein include various elements and limitations,with no one element or limitation contemplated as being a criticalelement or limitation. Each of the claims individually recites an aspectof the invention in its entirety. Moreover, some embodiments describedmay include, but are not limited to, inter alia, systems, networks,integrated circuit chips, embedded processors, ASICs, methods, andcomputer-readable media containing instructions. One or multiplesystems, devices, components, etc. may comprise one or more embodiments,which may include some elements or limitations of a claim beingperformed by the same or different systems, devices, components, etc.The embodiments described hereinafter embody various aspects andconfigurations within the scope and spirit of the invention, with thefigures illustrating exemplary and non-limiting configurations.

As used herein, the term “packet” refers to packets of all types or anyother units of information or data, including, but not limited to, fixedlength cells and variable length packets, each of which may or may notbe divisible into smaller packets or cells. The term “packet” as usedherein also refers to both the packet itself or a packet indication,such as, but not limited to all or part of a packet or packet header, adata structure value, pointer or index, or any other part or direct orindirect identification of a packet or information associated therewith.For example, often times a router operates on one or more fields of apacket, especially the header, so the body of the packet is often storedin a separate memory while the packet header is manipulated, and basedon the results of the processing of the packet (i.e., the packet headerin this example), the entire packet is forwarded or dropped, etc.Additionally, these packets may contain one or more types ofinformation, including, but not limited to, voice, data, video, andaudio information. The term “item” is used generically herein to referto a packet or any other unit or piece of information or data, a device,component, element, or any other entity. The phrases “processing apacket” and “packet processing” typically refer to performing some stepsor actions based on the packet contents (e.g., packet header or otherfields), and such steps or action may or may not include modifying,storing, dropping, and/or forwarding the packet and/or associated data.

The term “system” is used generically herein to describe any number ofcomponents, elements, sub-systems, devices, packet switch elements,packet switches, routers, networks, computer and/or communicationdevices or mechanisms, or combinations of components thereof. The term“computer” is used generically herein to describe any number ofcomputers, including, but not limited to personal computers, embeddedprocessing elements and systems, control logic, ASICs, chips,workstations, mainframes, etc. The term “processing element” is usedgenerically herein to describe any type of processing mechanism ordevice, such as a processor, ASIC, field programmable gate array,computer, etc. The term “device” is used generically herein to describeany type of mechanism, including a computer or system or componentthereof. The terms “task” and “process” are used generically herein todescribe any type of running program, including, but not limited to acomputer process, task, thread, executing application, operating system,user process, device driver, native code, machine or other language,etc., and can be interactive and/or non-interactive, executing locallyand/or remotely, executing in foreground and/or background, executing inthe user and/or operating system address spaces, a routine of a libraryand/or standalone application, and is not limited to any particularmemory partitioning technique. The steps, connections, and processing ofsignals and information illustrated in the figures, including, but notlimited to any block and flow diagrams and message sequence charts, maytypically be performed in the same or in a different serial or parallelordering and/or by different components and/or processes, threads, etc.,and/or over different connections and be combined with other functionsin other embodiments, unless this disables the embodiment or a sequenceis explicitly or implicitly required (e.g., for a sequence of read thevalue, process the value—the value must be obtained prior to processingit, although some of the associated processing may be performed priorto, concurrently with, and/or after the read operation). Furthermore,the term “identify” is used generically to describe any manner ormechanism for directly or indirectly ascertaining something, which mayinclude, but is not limited to receiving, retrieving from memory,determining, defining, calculating, generating, etc.

Moreover, the terms “network” and “communications mechanism” are usedgenerically herein to describe one or more networks, communicationsmedia or communications systems, including, but not limited to theInternet, private or public telephone, cellular, wireless, satellite,cable, local area, metropolitan area and/or wide area networks, a cable,electrical connection, bus, etc., and internal communications mechanismssuch as message passing, interprocess communications, shared memory,etc.

The term “message” is used generically herein to describe a piece ofinformation which may or may not be, but is typically communicated viaone or more communication mechanisms of any type.

The term “storage mechanism” includes any type of memory, storage deviceor other mechanism for maintaining instructions or data in any format.“Computer-readable medium” is an extensible term including any memory,storage device, storage mechanism, and other storage and signalingmechanisms including interfaces and devices such as network interfacecards and buffers therein, as well as any communications devices andsignals received and transmitted, and other current and evolvingtechnologies that a computerized system can interpret, receive, and/ortransmit. The term “memory” includes any random access memory (RAM),read only memory (ROM), flash memory, integrated circuits, and/or othermemory components or elements. The term “storage device” includes anysolid state storage media, disk drives, diskettes, networked services,tape drives, and other storage devices. Memories and storage devices maystore computer-executable instructions to be executed by a processingelement and/or control logic, and data which is manipulated by aprocessing element and/or control logic. The term “data structure” is anextensible term referring to any data element, variable, data structure,database, and/or one or more organizational schemes that can be appliedto data to facilitate interpreting the data or performing operations onit, such as, but not limited to memory locations or devices, sets,queues, trees, heaps, lists, linked lists, arrays, tables, pointers,etc. A data structure is typically maintained in a storage mechanism.The terms “pointer” and “link” are used generically herein to identifysome mechanism for referencing or identifying another element,component, or other entity, and these may include, but are not limitedto a reference to a memory or other storage mechanism or locationtherein, an index in a data structure, a value, etc.

The term “one embodiment” is used herein to reference a particularembodiment, wherein each reference to “one embodiment” may refer to adifferent embodiment, and the use of the term repeatedly herein indescribing associated features, elements and/or limitations does notestablish a cumulative set of associated features, elements and/orlimitations that each and every embodiment must include, although anembodiment typically may include all these features, elements and/orlimitations. In addition, the phrase “means for xxx” typically includescomputer-readable media containing computer-executable instructions forperforming xxx.

In addition, the terms “first,” “second,” etc. are typically used hereinto denote different units (e.g., a first element, a second element). Theuse of these terms herein does not necessarily connote an ordering suchas one unit or event occurring or coming before another, but ratherprovides a mechanism to distinguish between particular units.Additionally, the use of a singular tense of a noun is non-limiting,with its use typically including one or more of the particular thingrather than just one (e.g., the use of the word “memory” typicallyrefers to one or more memories without having to specify “memory ormemories,” or “one or more memories” or “at least one memory”, etc.).Moreover, the phrases “based on x” and “in response to x” are used toindicate a minimum set of items x from which something is derived orcaused, wherein “x” is extensible and does not necessarily describe acomplete list of items on which the operation is performed, etc.Additionally, the phrase “coupled to” is used to indicate some level ofdirect or indirect connection between two elements or devices, with thecoupling device or devices modifying or not modifying the coupled signalor communicated information. The term “subset” is used to indicate agroup of all or less than all of the elements of a set. The term“subtree” is used to indicate all or less than all of a tree. Moreover,the term “or” is used herein to identify a selection of one or more,including all, of the conjunctive items.

Locks can be used for many purposes. For example, one application oflocks is described in Williams et al., “Using Ordered Locking Mechanismsto Maintain Sequences of Items Such as Packets,” U.S. patent applicationSer. No. 10/706,704, filed Nov. 12, 2003, which is hereby incorporatedby reference.

Disclosed are, inter alia, methods, apparatus, data structures,computer-readable media, mechanisms, and means for communicatingprotected data within locking messages. Data is protected using locks,with the protected data sometimes being included in the lockingmessages, which may reduce overall processing latency, and/or reduce abandwidth requirement for and/or number of storage operations accessingthe native storage of the protected data. For example, in oneembodiment, the lock manager receives lock requests from each of therequesters, and selectively grants the lock requests. The protected datais typically communicated in the locking messages when the lock ishighly contested, or at least two request for access to the data arepending. The lock manager initiates the sequence by indicating in agrant message to a requester to include the protected data in itsrelease message. The lock manager then copies this data received in therelease message to its grant message to the next requestor. Althoughthis operation may require the lock manager to temporarily store thereceived release message including the protected data, it does not cacheor otherwise store the protected data locally awaiting the receipt of anext request, for example. If no other requesters are waiting, the grantmessage includes an indication not to send the protected data, and thusthe requestor typically stores this protected data to storage so it canbe accessed in the future.

One embodiment includes a lock manager configured to control access viaa lock to protected data maintained in native storage independent of thelock manager. The lock manager does not access the protected data fromthe native storage, rather it copies the protected data received intogrant messages sent to a next requester. The lock manager is configuredto receive lock requests for the lock from multiple requesters, and toselectively grant the lock requests which includes communicating grantsfrom the lock manager to the plurality of requesters, with at least oneof the communicated grants includes the protected data.

In one embodiment, at least one of the communicated grants does notinclude the protected data. In one embodiment, each of the communicatedgrants includes an indication of whether or not the protected data isbeing communicated therewith. In one embodiment, each of thecommunicated grants includes an indication of whether or not theprotected data is requested to be sent to the lock manager with acorresponding release of the lock. In one embodiment, each of the lockrequests includes an indication of whether or not the corresponding oneof the plurality of requesters will accept the protected data from thelock manager.

One embodiment includes a lock manager that controls access to protecteddata maintained in native storage independent of the lock manager. Thelock manager does not access the protected data from the native storage.The lock manager receives a release of a lock for use in controllingaccess to the protected data, with the received release including theprotected data. A next requester to be granted the lock is identified inresponse to the receiving the release of the lock. The protected data iscopied from the release into a grant message, and the grant messageincluding the protected data is sent to the next requester. In oneembodiment, the grant message includes an indication of that theprotected data is requested to be sent to the lock manager in a releasemessage corresponding to the grant message if another requester iswaiting for the lock, else an indication that the protected data is notrequested to be sent to the lock manager in the release message.

One embodiment includes a lock manager that controls access to protecteddata maintained in native storage independent of the lock manager. Thelock manager does not access the protected data from the native storage.The lock manager receives locking requests for a lock controlling accessto the protected data from a first requester and a second requester. Thelock manager sends a first grant message not including the protecteddata to the first requester, and in response to identifying one or morerequesters is waiting for the lock after the first requester, anindication to return the protected data is included in the grantmessage. A first release message including the protected data for thelock is subsequently received from the first requester.

In one embodiment, a second grant message is sent to the secondrequester, with the second grant message including the protected dataand an indication of whether or not to send the protected data in asecond release message. In one embodiment, the second grant messageincludes an indication to send the protected data in the second releasemessage in response to identifying another requester is waiting foraccess to the lock. In one embodiment, the second grant message includesan indication not to send the protected data in the second releasemessage in response to identifying another requestor is not waiting foraccess to the lock. In one embodiment, the second grant message includesan indication not to send the protected data in the second releasemessage, and in response to the indication not to send the protecteddata in the second release message, the second requester stores theprotected data and does not include the protected data in the secondrelease message.

One embodiment provides an indirect interprocess communication bypasschannel through a lock mechanism that is connected to many processors.These processors normally communicate through shared global memory anduse locks to enforce coherency. Under certain conditions, data can betransferred through lock messages instead of going through shared globalmemory. The data can be piggy-backed to the lock release message, gothrough the lock mechanism, and be piggy-backed to the lock grantmessage. The data is not stored for any significant amount of time inthe lock mechanism. The lock messages typically include control signalsto indicate when the conditions are right to use the bypass channel.This enforces the coherency of the shared memory location that might bebypassed.

When claiming to piggy-back the data to the lock message, the bypasschannel could be either serial or parallel to the lock message channel,as long as there is a strong binding of lock messages to bypass data. Inone embodiment, when requesting a lock, the request message includes anindication if it is willing to accept data through the bypass channel.When the lock is finally granted, the grant message indicates if it hasdata in the bypass channel, and if there is an entry following it in thelocking queue that is willing to accept data through the bypass channel.If the grant indicates that data is present in the bypass channel, thenthe critical section can skip the read of the global shared memorylocation and use the data from the bypass channel instead.

If the grant indicates that the next entry in the locking queue iswilling to accept data from the bypass channel, then the criticalsection of code can skip the write of the global shared memory locationand send the data through the bypass channel instead. The criticalsection of code can always send the data through the bypass channel withthe hope that a new arrival in the locking queue can use the data, butit must first commit the write to global shared memory if it is notcertain. When the lock is released, an indication is made in the releasemessage whether the bypass channel has data in it or not. The data inthe bypass channel is typically not stored in memory in the lockmechanism; rather it is simply copied (possibly using a temporarystorage location or register) from the release message and attached tothe subsequent grant message.

Turning to the figures, FIG. 2. illustrates an approach used in oneembodiment for protecting access to data with the protected data beingcommunicated in conjunction with locking messages. Lock manager 200receives locking requests 211-213 from requester-A 204, requester-B 206,and requester-C 208. Note, lock manager 200 is independent of thestorage mechanism/protected data 202 as it does not access stored lockprotected data 202 from its native storage as depicted in FIG. 2.

An example of such a locking request is locking request message 300illustrated in FIG. 3. As shown, request message 300 includes anindication 301 of which lock is being requested, an identification 302of the requester, and an indication 303 of whether the requestersupports protected data in locking messages. Of course, one embodimentuses another communication mechanism and/or some, all, or none of values301-303. Also, the number of bits illustrated for certain fields areonly exemplary of one embodiment.

For purposes of illustration, the description of FIG. 2 will assume thatall requesters will always support protected data in locking messages(and thus indication 303 is not required). In one embodiment when allrequesters do not always support protected data being communicated inlocking messages, locking manager 200 will only request protected datawhen the next requester supports such, and provide protected data in alocking message to a supporting requester.

Also shown in FIG. 3, is a grant message 310 used in one embodiment, andrelease message 320 used in one embodiment. As shown, grant message 310includes a lock indication 311 identifying the lock, a field 312 forincluding protected data, an indication 313 of whether or not field 312is populated with the protected data, and an indication 314 of whetheror not an explicit request to bypass native storage for the protecteddata is being made.

In one embodiment, if the native storage bypass request indication isset, the requester must return the latest value of the protected data ina corresponding release message, and the requester may or may not storethe protected data in its native storage prior to sending the release(i.e., the value of the protected data in the native storage may or maynot be the latest value). If the native storage bypass requestindication is not set, the requester must store the latest value ofprotected value in its native storage prior to sending the release, andthe release may or may not include a value of the protected value and ifit does include such a value, it is the latest value of the protecteddata. It is important in this situation that the value be stored in thenative storage, as the lock manager will not cache, write to nativestorage, or otherwise maintain a value of the protected data awaiting anext requester. If a requester is not waiting at time of receipt of arelease message containing the protected data, the lock manager dropsthe protected data, and thus a next requester will need to retrieve itfrom native storage.

Optionally or always sending the protected data in the release messagemay be particularly useful when bandwidth to the lock manager is not anissue or a bit field for the protected data is always allocated and sentso it might as well be populated with the protected data. Thus, if thelock manager receives a release message including the protected data, itknows it can send the protected data to the next requester as itincludes the latest value of the protected value. This may beparticularly useful if no other requester at time of grant is waitingfor the lock (and thus a request to return the protected data istypically not included in the grant message), and a requester is waitingfor the lock when the release message optionally including the protecteddata is received. In which case, the waiting requester can receive theprotected data and not have to retrieve it from the native storagelocation of the protected data.

Also shown in FIG. 3 is release message 320, which includes a lockindication 321 identifying the lock, a field 322 for including protecteddata, an indication 323 of whether or not field 322 is populated withthe protected data. Of course, many different messages, fields within amessage, and semantics of such messages and fields may be used by anembodiment in keeping with the scope and spirit of the invention.

Returning to the processing illustrated in FIG. 2, lock manager 200selects one of the received locking requests, typically in the orderreceived and queues the other requests pending the receipt of a lockingrelease. For purposes of this illustration, lock manager 200 willservice locking requests 211, 212 and 213 in that order.

Locking manager 200, in response to locking request 211, prepares andsends (221) a grant to requester-A 204. Locking manager 200, in responseto one or more pending other requests for the lock, includes anindication in the grant for the protected data to be included in acorresponding release message (e.g., an active request to bypass nativestorage). Requester-A 204, in response to the grant, reads (222) andreceives (223) lock protected data 202 typically from shared memorytypically available to all requesters 204-208, and processes (224) data202. Upon completion of processing the protected data, requester-A 204communicates (225) a release of the lock with the latest value of theprotected data to lock manager 200 in response to the request to includethe protected data in the release message.

In response to receipt of the lock release and the protected data, lockmanager 200 prepares a grant including the received protected datacopied from the received release, and sends (231) the grant torequester-B 206. Locking manager 200, in response to one or more pendingother requests for the lock, also includes an indication in the grantfor the protected data to be included in a corresponding releasemessage. Requester-B 206, in response to the grant, processes (232)based on the protected data received in the grant message. Note, it doesnot need to read stored lock protected data 202 as its latest value wasincluded in the grant. Also, note, that at least in one embodiment, thecurrent value of the protected data may be different from that of storedlock protected data 202. Upon completion of processing the protecteddata, requester-B 206 communicates (233) a release of the lock with thelatest value of the protected data to lock manager 200 in response tothe request to include the protected data in the release message.

In response to receipt of the lock release and the protected data, lockmanager 200 prepares a grant including the received protected datacopied from the received release, and sends (241) the grant torequester-C 208. Locking manager 200, in response to no pending requestsfor the lock, also includes an indication (e.g., a non-active request tobypass native storage) in the grant for that the protected data that theprotective data must be written to its native storage (e.g., and theprotected data may or may not be included in the corresponding releasemessage). Requester-C 208, in response to the grant, processes (242)based on the protected data received in the grant message. Note, it doesnot need to read stored lock protected data 202 as its latest value wasincluded in the grant. Upon completion of processing the protected data,requester-C 208 writes (243) the current value of the protected data tostored lock protected data 202, and communicates (244) a release of thelock possibly without the latest value of the protected data to lockmanager 200 in response to the request to not include the protected datain the release message.

FIGS. 4A-B illustrate lock manager processes used in one embodiment.Turning first to FIG. 4A, processing begins with process block 400, andproceeds to process block 402, wherein a lock request is received. Asdetermined in process block 404, if the lock is in the lock state, thenin process block 408, the lock request is queued. Otherwise, in processblock 406, a grant is communicated to the requester and the lock ismarked as in the lock state. Processing is complete as indicated byprocess block 410.

Processing of the flow diagram of FIG. 4B begins with process block 420,and proceeds to process block 422, wherein a lock release is received.As determined in process block 424, if there is no pending request, thenin process block 426, the lock is marked as in the not locked state; andprocessing is complete as indicated by process block 444.

Otherwise, in process block 428, a next lock request to grant isidentified, typically from the head of the lock queue or based on someother methodology. As determined in process block 430, if there isanother pending request, then in process block 432, the indication tosend the protected data in the corresponding release message (i.e., thebypass native storage request indication) is set; otherwise, it iscleared in process block 434.

As determined in process block 436, if the protected data was receivedin the received lock release, then in process block 438, the protecteddata is copied from the received release message to the grant message,and an indication that the protected data is being included in the grantmessage is set. Otherwise, in process block 440, an indication istypically included in the grant message that the protected data is notbeing communicated. In process block 442, the grant message is sent tothe identified next lock requester; and processing is complete asindicated by process block 444.

FIG. 4C illustrates a requester process used in one embodiment.Processing begins with process block 450, and proceeds to process block452, wherein the grant is received. As determined in process block 454,if the protected data is included, then in process block 456, processingis performed based on the received protected data. Otherwise, in processblock 458, the protected data is retrieved from storage, and processingis performed based on the retrieved protected data.

After processing of the protected data is complete, then, as determinedin process block 460, if the received grant indicated that nativestorage is to be bypassed, then processing proceeds to process block468. Otherwise, in process block 462, the latest value of the protecteddata is stored in its native storage location. As determined in processblock 464, if the protected data is to be included in the release (e.g.,it is always included, or optionally included based on somedetermination), then processing proceeds to process block 468.Otherwise, in process block 466, the release message is sent to the lockmanager without the protected data. In process block 468, a releasemessage including the latest value of the protected data is sent to thelock manager. Processing is complete as indicated by process block 469.

FIG. 5A illustrates a system including a lock manager 501 and multiplerequesters 511-519 of one embodiment. FIG. 5A shows the extensiblenature of one embodiment of the invention which can be applied to anapplication. Lock manager 501 and multiple requesters 511-519 can beprocesses, separate processing elements, or any other processingmechanism or entity in one or more systems, elements, or components. Asshown, lock manager 501 is communicatively coupled via communicationsmechanism 509 with multiple requesters 511-519, which are alsocommunicatively coupled to the mechanism 502 for storing the protecteddata and/or other resources.

FIG. 5B illustrate a system or component used in one embodiment forimplementing a lock manager and/or one or more requesters. In oneembodiment, system or component 540 performs one or more processescorresponding to one of the flow diagrams illustrated or otherwisedescribed herein. For example, in one embodiment, the lock manager andrequesters are processes running on processing element 541, and memory542 is used for storing the protected data when it is not communicatedvia locking messages.

In one embodiment, system or component 540 includes a processing element541, memory 542, storage devices 543, and an interface 544 for sendingand receiving packets, items, and/or other information, which aretypically coupled via one or more communications mechanisms 549 (shownas a bus for illustrative purposes.) Various embodiments of component540 may include more or less elements. The operation of component 540 istypically controlled by processing element 541 using memory 542 andstorage devices 543 to perform one or more tasks or processes. Memory542 is one type of computer-readable media, and typically comprisesrandom access memory (RAM), read only memory (ROM), flash memory,integrated circuits, and/or other memory components. Memory 542typically stores computer-executable instructions to be executed byprocessing element 541 and/or data which is manipulated by processingelement 541 for implementing functionality in accordance with anembodiment. Storage devices 543 are another type of computer-readablemedia, and typically comprise solid state storage media, disk drives,diskettes, networked services, tape drives, and other storage devices.Storage devices 543 typically store computer-executable instructions tobe executed by processing element 541 and/or data which is manipulatedby processing element 541 for implementing functionality in accordancewith an embodiment.

In view of the many possible embodiments to which the principles of ourinvention may be applied, it will be appreciated that the embodimentsand aspects thereof described herein with respect to thedrawings/figures are only illustrative and should not be taken aslimiting the scope of the invention. For example and as would beapparent to one skilled in the art, many of the process block operationscan be re-ordered to be performed before, after, or substantiallyconcurrent with other operations. Also, many different forms of datastructures could be used in various embodiments. The invention asdescribed herein contemplates all such embodiments as may come withinthe scope of the following claims and equivalents thereof.

1. An apparatus for protecting data using locks, the apparatuscomprising: a lock manager configured to control access via a lock toprotected data maintained in native storage independent of the lockmanager, wherein the lock manager does not access said protected datafrom said native storage; and a plurality of requesters; wherein thelock manager is configured to receive lock requests for the lock fromeach of the plurality of requesters, and to selectively grant said lockrequests which includes communicating grants from the lock manager tothe plurality of requesters, wherein at least one of said communicatedgrants includes said protected data.
 2. The apparatus of claim 1,wherein at least one of said communicated grants does not include saidprotected data.
 3. The apparatus of claim 1, wherein each of saidcommunicated grants includes an indication of whether or not saidprotected data is being communicated therewith.
 4. The apparatus ofclaim 1, wherein each of said communicated grants includes an indicationof whether or not said protected data is requested to be sent to thelock manager with a corresponding release of the lock.
 5. The apparatusof claim 1, wherein each of said lock requests includes an indication ofwhether or not the corresponding one of the plurality of requesters willaccept said protected data from the lock manager.
 6. A method performedby a lock manager controlling access to protected data maintained innative storage independent of the lock manager, wherein the lock managerdoes not access said protected data from said native storage, the methodcomprising: receiving a release of a lock for use in controlling accessto said protected data, the release including said protected data;identifying a next requester to be granted the lock in response to saidreceiving the release of the lock; copying said protected data from therelease into a grant message; and sending the grant message to the nextrequester, the grant message including said protected data.
 7. Themethod of claim 6, wherein the grant message includes an indication ofthat said protected data is requested to be sent to the lock manager ina release message corresponding to the grant message if anotherrequester is waiting for the lock, else an indication that saidprotected data is not requested to be sent to the lock manager in therelease message.
 8. A computer-readable medium containingcomputer-executable instructions for performing steps by a lock managerfor controlling access to protected data maintained in native storageindependent of the lock manager, wherein the lock manager does notaccess said protected data from said native storage, said stepscomprising: receiving a release of a lock for use in controlling accessto said protected data, the release including said protected data;identifying a next requester to be granted the lock in response to saidreceiving the release of the lock; copying said protected data from therelease into a grant message; and sending the grant message to the nextrequester, the grant message including said protected data.
 9. Thecomputer-readable medium of claim 8, wherein the grant message includesan indication of that said protected data is requested to be sent to thelock manager in a release message corresponding to the grant message ifanother requester is waiting for the lock, else an indication that saidprotected data is not requested to be sent to the lock manager in therelease message.
 10. A lock manager controlling access to protected datamaintained in native storage independent of the lock manager, whereinthe lock manager does not access said protected data from said nativestorage, the lock manager comprising: means for receiving a release of alock for use in controlling access to said protected data, the releaseincluding said protected data; means for identifying a next requester tobe granted the lock in response to said receiving the release of thelock; means for copying said protected data from the release into agrant message and for sending the grant message to the next requester.11. The lock manager of claim 10, means for including in the grantmessage an indication of that said protected data is requested to besent to the lock manager in a release message corresponding to the grantmessage if another requester is waiting for the lock, else an indicationthat said protected data is not requested to be sent to the lock managerin the release message.
 12. A method performed by a lock managercontrolling access to protected data maintained in native storageindependent of the lock manager, wherein the lock manager does notaccess said protected data from said native storage, the methodcomprising: receiving locking requests for a lock controlling access tosaid protected data from a first requester and a second requester;sending a first grant message to the first requester, the first grantmessage not including said protected data, and in response toidentifying one or more requesters is waiting for the lock after thefirst requester, including an indication to return said protected datain the first grant message; receiving a first release messagecorresponding to the first grant message for the lock from the firstrequester, the first release message including said protected data. 13.The method of claim 12, comprising sending a second grant message to thesecond requester, the second grant message including said protecteddata, and an indication of whether or not to send said protected data ina second release message.
 14. The method of claim 13, wherein the secondgrant message includes an indication to send said protected data in thesecond release message in response to identifying another requestor iswaiting for access to the lock.
 15. The method of claim 13, wherein thesecond grant message includes an indication not to send said protecteddata in the second release message in response to identifying anotherrequestor is not waiting for access to the lock.
 16. The method of claim13, wherein the second grant message includes an indication not to sendsaid protected data in the second release message; and the methodcomprises in response to said indication not to send said protected datain the second release message, the second requester storing saidprotected data and not including said protected data in the secondrelease message.
 17. A computer-readable medium containingcomputer-executable instructions for performing steps by a lock managerfor controlling access to protected data maintained in native storageindependent of the lock manager, wherein the lock manager does notaccess said protected data from said native storage, said stepscomprising: receiving locking requests for a lock controlling access tosaid protected data from a first requester and a second requester;sending a first grant message to the first requester, the first grantmessage not including said protected data, and in response toidentifying one or more requesters is waiting for the lock after thefirst requester, including an indication to return said protected datain the first grant message; receiving a first release messagecorresponding to the first grant message for the lock from the firstrequester, the first release message including said protected data. 18.The computer-readable medium of claim 17, wherein said steps comprisesending a second grant message to the second requester, the second grantmessage including said protected data, and an indication of whether ornot to send said protected data in a second release message.
 19. Thecomputer-readable medium of claim 18, wherein the second grant messageincludes an indication to send said protected data in the second releasemessage in response to identifying another requestor is waiting foraccess to the lock.
 20. The computer-readable medium of claim 18,wherein the second grant message includes an indication not to send saidprotected data in the second release message in response to identifyinganother requestor is not waiting for access to the lock.
 21. Thecomputer-readable medium of claim 18, wherein the second grant messageincludes an indication not to send said protected data in the secondrelease message; and said steps comprise in response to said indicationnot to send said protected data in the second release message, thesecond requester storing said protected data and not including saidprotected data in the second release message.
 22. A lock managercontrolling access to protected data maintained in native storageindependent of the lock manager, wherein the lock manager does notaccess said protected data from said native storage, the lock managercomprising: means for receiving locking requests for a lock controllingaccess to said protected data from a first requester and a secondrequester; means for sending a first grant message to the firstrequester, the first grant message not including said protected data,and in response to identifying one or more requesters is waiting for thelock after the first requester, including an indication to return saidprotected data in the first grant message; means for receiving a firstrelease message for the lock from the first requester, the first releasemessage including said protected data.
 23. The lock manager of claim 22,comprising means for sending a second grant message to the secondrequester, the second grant message including said protected data, andan indication of whether or not to send said protected data in a secondrelease message.
 24. The lock manager of claim 23, comprising means forincluding in the second grant message an indication to send saidprotected data in the second release message in response to identifyinganother requester is waiting for access to the lock.
 25. The lockmanager of claim 23, comprising means for including in the second grantmessage an indication not to send said protected data in the secondrelease message in response to identifying another requestor is notwaiting for access to the lock.
 26. The lock manager of claim 23,comprising: means for including in the second grant message anindication not to send said protected data in the second releasemessage; and means for the second requester to store said protected dataand not to include said protected data in the second release message inresponse to said indication not to send said protected data in thesecond release message.